package com.linwen.excise.niuke._20;

import java.util.Scanner;

/**
 * @author wlw
 * @date 2023/3/1 10:03 PM
 */
public class _2计算某字符出现次数 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        char c = scanner.next().toLowerCase().charAt(0);
        char[] chars = str.toLowerCase().toCharArray();
        int count = 0;
        for (char aChar : chars) {
            if(aChar==c){
                count++;
            }
        }
        System.out.println(count);
    }
}
